package com.haungg.base;

import java.io.Serializable;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.haungg.base.BasePO;
import com.haungg.base.DaoAble;

@Service("baseService")
@Transactional(readOnly=true)
public class BaseServiceImpl<T extends BasePO> implements ServiceAble<T> {
	
	@Resource
	protected DaoAble baseDao;

	public T get(Class<T> clazz, Serializable id) {
		return baseDao.get(clazz, id);
	}

	public T load(Class<T> clazz, Serializable id) {
		return baseDao.load(clazz, id);
	}

	public List<T> find(String queryString) {
		return baseDao.find(queryString);
	}

}
